#include <iostream>
#include <string>

class Building
{
    friend void goodGay(Building*building); // 这就能访问私有属性和方法了？？？（成员）
    public:
    std::string m_SittingRoom;
    Building()
    {
        m_BedRoom = "Bedroom";
        m_SittingRoom = "Sittingroom";
    }
    private:
    std::string m_BedRoom;

};

void goodGay(Building*building)
{
    std::cout << "friend function is visiting your "<<building->m_SittingRoom<<std::endl;
    std::cout << "friend function is visiting your "<< building->m_BedRoom<<std::endl;
}

void test()
{
    Building building;
    goodGay(&building);

}
int main()
{
    test();
    return 0;
}